D3D12: Greatly reduce shader conversion time & fix spec constant bitmasking.#111762
Merged
akien-mga merged 1 commit intogodotengine:masterfrom Nov 4, 2025
Merged
Conversation
9745048 to
8895dfa
Compare
akien-mga
approved these changes
Nov 3, 2025
Member
akien-mga
left a comment
There was a problem hiding this comment.
Looks good.
We should also update the build scripts used by official builds here:
https://github.com/godotengine/godot-build-scripts/blob/main/build.sh#L193-L195
I'll send a PR and make sure to re-download the deps for the next 4.6 build.
Is this update suitable as is for potential 4.5.x too, or would be need to cherry-pick the removal of the validation check?
Contributor
Author
|
I think this should be 4.6 only, since that's the version we want to hopefully default to D3D12. |
akien-mga
added a commit
to godotengine/godot-build-scripts
that referenced
this pull request
Nov 3, 2025
clayjohn
approved these changes
Nov 3, 2025
akien-mga
added a commit
to godotengine/godot-build-scripts
that referenced
this pull request
Nov 4, 2025
Member
|
Thanks! |
Member
|
Cherry-picked for 4.5.2. |
akien-mga
added a commit
to godotengine/godot-build-scripts
that referenced
this pull request
Jan 9, 2026
Companion PR to: - godotengine/godot-nir-static#22 - godotengine/godot-nir-static#23 - godotengine/godot#111762 (cherry picked from commit 7126657)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up PR to #111356.
Shader Conversion Time Reduction
Partner PR: godotengine/godot-nir-static#23
Reduces shader conversion time up to 2x - 2.5x depending on the project. In TPS Demo, the loading screen goes from 82 seconds to 33 seconds on my system. For reference, Vulkan is 15 seconds.
NOTE: If you want to make a comparison yourself, you need to clear both Godot and driver shader caches before each launch to have a fair comparison:
project/.godot/shader_cache%APPDATA%/Godot/app_userdata/project/shader_cache%LOCALAPPDATA%/NVIDIA%LOCALAPPDATA%/AMDSpecialization Constants Bitmasking Fix
Partner PR: godotengine/godot-nir-static#22
Old behavior used to set the second MSB to 1, then mask that out inside the DXIL shader. We shouldn't do that anymore now that we allow all of the specialization constant bits.
This was causing less shadow map samples to be used, notably with the "Soft High (Slow)" mode for "Soft Shadow Filter Quality" parameter: